<!DOCTYPE html>

<html lang="en">



<head>

	<meta charset="UTF-8">

	<title>会员详情</title>

	<meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0.maximum-scale=1.0,user-scalable=no"
		name="viewport">

	<script src="js/flexible.js"></script>

	<link rel="stylesheet" href="css/reset.css">

	<link rel="stylesheet" href="css/homePage.css">

	<link rel="stylesheet" href="css/flexible.css">

	<link rel="stylesheet" href="css/vant.css">

	<script src="js/jquery-3.3.1.min.js"></script>

	<script src="js/vue/vue.js"></script>

	<script src="js/vue/axios.js"></script>

	<script src="js/vue/MD5.js"></script>

	<script src="js/vue/vant.js"></script>

	<style>
		.nav li {

			width: 33.3333%
		}

		.content .list.cart {

			min-height: 4rem;

		}

		.first_list {

			border: 1px solid #f3f3f3;

			padding: 0.1rem 0.1rem 0 0.1rem;

			border-radius: 0.04rem;

			margin-top: 0.2rem;

		}



		.content {

			padding: 10px;

			overflow: hidden;

		}



		.card_title {

			font-size: 0.15rem;

			font-weight: 600;

		}



		.card_head {

			overflow: hidden;

			height: 0.25rem;

			line-height: 0.25rem;

			font-size: 0.14rem;

			padding-bottom: 0.1rem;

			margin-bottom: 0.1rem;

			border-bottom: 1px solid #f3f3f3;

		}



		.card_head p:nth-child(2) {

			background: #FBB132;

			color: #fff;

			padding: 0 0.08rem;

			font-size: 0.12rem
		}



		.after_hx {

			display: inline-block;

			text-align: right;

			width: 0.8rem;

			margin-right: 0.2rem;

		}



		.after_hx:after {

			content: "";

			width: 2px;

			height: 0.19rem;

			background-color: rgba(151, 151, 151, 0.2);

			position: absolute;

			margin-left: 0.1rem;

		}



		.card_ul li {

			font-size: 0.13rem;

			padding-bottom: 0.05rem;

			padding-top: 0.05rem;

			font-weight: 600;

		}



		.card_ul li:nth-child(1) span:nth-child(2) {

			color: rgba(14, 156, 250, 1);

		}



		.card_ul li:nth-child(2) span:nth-child(2) {

			color: #999999;

		}



		.card_ul li:nth-child(3) span:nth-child(2) {

			color: #999999;

		}



		.card_ul li:nth-child(4) span:nth-child(2) {

			color: #FBB132;

		}



		.list_two {

			margin-top: 0.2rem;

		}



		.list_two li {

			text-align: center;

			float: left;

			border: 1px solid #0E9CFA;

			margin-right: 0.1rem;

			width: 24%;

			padding: 0.2rem 0.1rem;

			border-radius: 0.04rem;



		}



		.list_two li p {

			height: 0.25rem;

			line-height: 0.25rem;

		}



		.list_two li:nth-child(3) {

			margin-right: 0rem;

		}



		.list_two li p:nth-child(1) {

			color: red;

			font-weight: 600;

			font-size: 0.16rem;

		}
	</style>

</head>



<body>

	<div id="app">

		<template>

			<div class="container_box">

				<div class="group_details head_card_message clearfix" style="padding-right: 0.1rem;">

					<div class="fl head_card">

						<img :src="user.Picurl" class="spinning_img" />

					</div>

					<div class="spinning_txt fl content_right">

						<div class="fk_star">

							<div class="lf fontsize12">{{user.Username}}</div>

							<div class="fk_phone">

								<a :href="'tel:'+user.Phone">

									<img src="images/phone.png" />

								</a>

							</div>

						</div>

						<p class="fk_phone1">

							<a :href="'tel:'+user.Phone"><span class="spinning_name">{{user.Phone}}</span></a>

						</p>

					</div>

				</div>

				<div class="tar_qh fk_content bordertops">

					<ul class="nav">

						<li v-for="(item,index) in dataTar" @click="currIndexs(index)">

							<span :class="{selected:currIndex==index}">{{item.name}}</span>

						</li>

					</ul>

					<div class="content">

						<div class="list bordertop" v-if="currIndex=='0'">

							<div v-if="classData.length>0">

								<div class="course_jl" v-for="items in classData">

									<span class="lf">{{items.Title}}</span>

									<span class="rf">{{items.Bdate}}</span>

								</div>

							</div>

							<div v-else style="margin-top: .2rem;text-align: center;">

								<img src="images/notDate.jpg" />

							</div>

						</div>

						<div class="list" v-else-if="currIndex=='1'">

							<div class="addTcjl" @click="addSide">+ 添加体侧记录</div>

							<div v-if="listData.length>0">

								<div class="body_details" v-for="(itemList,index) in listData">

									<div class="ovfl body_side">

										<p class="lf">

											<span class="fontSize12">记录时间：</span>

											<span class="color_body">{{itemList.Addtime}}</span>

										</p>

										<p class="rf">

											<span class="fontSize12">记录人：</span>

											<span class="color_body">{{itemList.Sname}}</span>

										</p>

									</div>

									<div class="body_data margintop1">

										<p>

											<span>身高：</span>

											<span>{{itemList.height}} CM</span>

										</p>

										<p>

											<span>体重：</span>

											<span>{{itemList.weight}} KG</span>

										</p>

									</div>

									<div class="body_data">

										<p>

											<span>BMI：</span>

											<span>{{itemList.bmi}}</span>

										</p>

										<p>

											<span>体脂：</span>

											<span>{{itemList.bodyfat}} %</span>

										</p>

									</div>

									<div class="open_content" v-if="currIndexsd==index">

										<div class="body_data">

											<p>

												<span>臀围：</span>

												<span>{{itemList.hipline}} CM</span>

											</p>

											<p>

												<span>胸围：</span>

												<span>{{itemList.bust}} CM</span>

											</p>

										</div>

										<div class="body_data">

											<p>

												<span>腰围：</span>

												<span>{{itemList.thewaist}} CM</span>

											</p>

											<p>

												<span>肩宽：</span>

												<span>{{itemList.shoulder}} CM</span>

											</p>

										</div>

										<div class="body_data">

											<p>

												<span>小腿围：</span>

												<span>{{itemList.minthigh}} CM</span>

											</p>

											<p>

												<span>大腿围：</span>

												<span>{{itemList.maxthigh}} CM</span>

											</p>

										</div>

										<div class="remarks">

											备注内容: {{itemList.info}}

										</div>

									</div>

									<div class="open_details" v-if="currIndexsd==index" @click="zkSq(index)">

										<span>收起</span>

										<img class="showHide" src="images/jt_s.png">

									</div>

									<div class="open_details" v-else @click="zkSqS(index)">

										<span>展开</span>

										<img class="showHide" src="images/jt_x.png">

									</div>



								</div>

							</div>

							<div v-else style="margin-top: .2rem;text-align: center;">

								<img src="images/notDate.jpg" />

							</div>

						</div>

						<div class="list cart" v-else>

							<div class="first_list" v-for="item in cardList">

								<div class="card_head">

									<p class="lf card_title">{{item.Cardname}}</p>

									<p class="rf" v-if="item.Cardtype == 20">次数卡</p>

									<p class="rf" v-else-if="item.Cardtype == 10">期限卡</p>

									<p class="rf" v-else-if="item.Cardtype == 70">计时卡</p>

									<p class="rf" v-else-if="item.Cardtype == 50">私教课</p>

									<p class="rf" v-else>储值卡</p>

								</div>

								<ul class="card_ul">

									<li>

										<span class="after_hx">状态</span>

										<span v-if="item.State == 0">正常</span>

										<span v-else-if="item.State == 1">停用</span>

										<span v-else-if="item.State == 2">转让</span>

										<span v-else-if="item.State == 3">到期</span>

										<span v-else>请假</span>

									</li>

									<li>

										<span class="after_hx">余额</span> <span>{{item.Surplus}}</span>

									</li>

									<li>

										<span class="after_hx">有效期</span> <span>{{item.IsEffective_date}}</span>

									</li>

									<li>

										<span class="after_hx">入场</span>

										<span>{{item.Sign_count}}次</span>

									</li>

									<li>

										<span class="after_hx">购卡金额</span> <span>￥{{item.Acamount}}</span>

									</li>

								</ul>

								<!-- <div class="card_bottom">

									<div class="card_bottom_item">充值记录</div>

									<div class="line"></div>

									<div class="card_bottom_item">请假记录</div>

								</div> -->

							</div>

						</div>

					</div>

				</div>

			</div>

		</template>

		<div class="technology">馆家提供技术支持</div>

	</div>

</body>

<script>
	Date.prototype.format = function (fmt) {
		var o = {
			"M+": this.getMonth() + 1, //月份
			"d+": this.getDate(), //日
			"h+": this.getHours(), //小时
			"m+": this.getMinutes(), //分
			"s+": this.getSeconds(), //秒
			"q+": Math.floor((this.getMonth() + 3) / 3), //季度
			S: this.getMilliseconds(), //毫秒
		};
		if (/(y+)/.test(fmt))
			fmt = fmt.replace(
				RegExp.$1,
				(this.getFullYear() + "").substr(4 - RegExp.$1.length)
			);
		for (var k in o)
			if (new RegExp("(" + k + ")").test(fmt))
				fmt = fmt.replace(
					RegExp.$1,
					RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
				);
		return fmt;
	};
	new Vue({

		el: '#app',

		data: {

			uid: '',

			currIndex: '0',

			currIndexsd: '0',

			dataTar: [

				{

					name: "上课记录"

				},

				{

					name: "体侧记录"

				},

				{

					name: "会员卡"

				}

			],

			classData: [],

			user: {},

			listData: [],

			cardList: []

		},

		created() {

			this.setCanS()

		},

		methods: {

			//设置参数

			setCanS() {

				let Request = new Object()

				Request = GetRequest()

				this.uid = Request['uid']

				this.getList()

			},

			getList() {

				const params = {

					uid: this.uid,

				}

				getVs()

				axios.get('mobileapi/coach/user.php?act=user_info', { params: params }).then(data => {

					console.log(data.data)

					let { msg, code, user } = data.data

					if (code !== 200) {

						window.vant.Toast.fail(msg)

					} else {

						data = data.data
						var carr = data.data.class;
						for (let index = 0; index < carr.length; index++) {
							const element = carr[index];
							var date1 = new Date(element.Bstime * 1000);
							element.Bdate = date1.format("yyyy-MM-dd hh:mm");
						}



						this.classData = carr

						this.listData = data.data.list

						this.user = data.data.user

						this.cardList = data.data.card_list

						if (this.user.Picurl == "" || this.user.Picurl == null) {

							this.user.Picurl = "images/moren.png"

						}

					}

				}).catch(function (error) {

					console.log(error);

				})

			},

			//切换

			currIndexs(index) {

				this.currIndex = index

			},

			zkSq(index) {

				this.currIndexsd = index + 1

			},

			zkSqS(index) {

				this.currIndexsd = index

			},

			//添加体侧记录

			addSide() {

				window.location.href = 'addSide.html?uid=' + this.uid + ''

			},



		}

	})

</script>



</html>